<?php
/**
 * gpa_new Description
 * @package
 * @name model_home
 * @filesource model_home.php
 * @author Hanny Setiawan
 */

class model_home extends Model
{
    /**
     * @access public
     * @method __construct
     * @param void
     * @return void
     */
    public function  __construct()
    {
        parent::__construct();
    }

    public function getEditorChoiceImages() {
        $images = array();
        $gallery_model = $this->getModel('gallery');
        $option['thumb_size'] = 150;
        $rows = $this->db->query("SELECT image_id FROM #_gallery_editor_choice")->rows;
        
        foreach($rows as $img) {
            $images[] = $gallery_model->getImageById($img['image_id'], $option);
        }

        return $images;
    }
}
?>